package com.cloud.upms.controller;

import com.cloud.common.core.result.Result;
import com.cloud.api.upms.model.SysLog;
import com.cloud.upms.service.SysLogService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author:  xuanning
 * Date:    2022/10/26 20:24
 */
@RestController
@AllArgsConstructor
@RequestMapping("/log")
public class SysLogController {

    private final SysLogService sysLogService;

    @PostMapping("/save")
    public Result<Boolean> saveLog(@RequestBody SysLog sysLog){
        sysLogService.save(sysLog);
        return Result.success();
    }
}
